package com.UnionPayCenter.service;

import com.UnionPayCenter.entity.ComponentExamineLogEntity;
import com.UnionPayCenter.entity.vo.ComponentGrantInfoVo;
import com.UnionPayCenter.entity.vo.TemplateDraftVo;
import com.UnionPayCenter.entity.vo.TemplateVo;
import com.alibaba.fastjson.JSONObject;
import com.github.pagehelper.PageInfo;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public interface IComponentService {

    /** 
    * @Description: 授权事件接受url 每隔10分钟 获取微信服务器推送ticket 接收后需要解密 接收到后 必须返回字符串success
    * @Param:  
    * @return:  
    * @Author: bite 
    * @Date: 2019/7/21 
    */
    String openBack(HttpServletRequest request, HttpServletResponse response);

    /** 
    * @Description: 获取授权网页网址
    * @Param:  
    * @return:  
    * @Author: bite 
    * @Date: 2019/7/22 
    */
    String findAuthUrl(JSONObject jsonParam) throws Exception;

    /** 
    * @Description: 使用授权码获取授权信息
    * @Param:  
    * @return:  
    * @Author: bite 
    * @Date: 2019/7/22 
    */ 
    boolean authCodeBack(Integer shopId, String authCode) throws Exception;

    /** 
    * @Description: 消息与事件接收URL
    * @Param:  
    * @return:  
    * @Author: bite 
    * @Date: 2019/7/23 
    */ 
    String mpBack(String appid, HttpServletRequest request, HttpServletResponse response);

    /** 
    * @Description: 绑定开发平台
    * @Param:  
    * @return:  
    * @Author: bite 
    * @Date: 2019/7/23 
    */ 
    boolean openBind(JSONObject jsonParam) throws Exception;

    /** 
    * @Description: 微信第三方接口公众号关联小程序
    * @Param:  
    * @return:  
    * @Author: bite 
    * @Date: 2019/7/23 
    */ 
    boolean wxLink(Integer shopId) throws Exception;

    /**
     * @Description: 微信第三方接口获取并保存小程序模版id
     * @Param:
     * @return:
     * @Author: bite
     * @Date: 2019/7/23
     */
    boolean serviceTemplatesSave(Integer shopId) throws Exception;

    /** 
    * @Description: 查询商铺授权列表
    * @Param:  
    * @return:  
    * @Author: bite 
    * @Date: 2019/7/25 
    */ 
    PageInfo<ComponentGrantInfoVo> findAuthList(JSONObject jsonParam);

    /** 
    * @Description: 查询代码草稿列表 
    * @Param:  
    * @return:  
    * @Author: bite 
    * @Date: 2019/7/25 
    */ 
    PageInfo<TemplateDraftVo> findTemplateDraftList(JSONObject jsonParam) throws Exception;

    /** 
    * @Description: 将草稿添加到代码模板库
    * @Param:  
    * @return:  
    * @Author: bite 
    * @Date: 2019/7/27 
    */ 
    boolean addToTemplate(JSONObject jsonParam) throws Exception;

    /** 
    * @Description: 查询代码模板列表 
    * @Param:  
    * @return:  
    * @Author: bite 
    * @Date: 2019/7/27 
    */ 
    PageInfo<TemplateVo> findTemplateList(JSONObject jsonParam) throws Exception;

    /** 
    * @Description: 删除代码库模版 
    * @Param:  
    * @return:  
    * @Author: bite 
    * @Date: 2019/7/27 
    */ 
    boolean deleteTemplate(JSONObject jsonParam) throws Exception;

    /** 
    * @Description: 单个提交审核
    * @Param:  
    * @return:  
    * @Author: bite 
    * @Date: 2019/7/27 
    */ 
    boolean submitAudit(JSONObject jsonParam) throws Exception;

    /** 
    * @Description: 单个发布
    * @Param:  
    * @return:  
    * @Author: bite 
    * @Date: 2019/7/27 
    */ 
    boolean release(JSONObject jsonParam) throws Exception;

    /** 
    * @Description: 单独查询最后一次审核状态
    * @Param:  
    * @return:  
    * @Author: bite 
    * @Date: 2019/7/27 
    */ 
    ComponentExamineLogEntity findLastExamineStatus(JSONObject jsonParam) throws Exception;

    /** 
    * @Description: 绑定
    * @Param:  
    * @return:  
    * @Author: bite 
    * @Date: 2019/7/28 
    */ 
    boolean openBinds(Integer shopId) throws Exception;

    /** 
    * @Description: 全部提交审核
    * @Param:  
    * @return:  
    * @Author: bite 
    * @Date: 2019/7/28 
    */ 
    boolean allSubmitAudit(JSONObject jsonParam) throws Exception;

    /** 
    * @Description: 全部发布
    * @Param:  
    * @return:  
    * @Author: bite 
    * @Date: 2019/7/28 
    */ 
    boolean allRelease(JSONObject jsonParam) throws Exception;
}
